Termination Proof Script
Consider the TRS R consisting of the rewrite rules
|
1: |
|
plus(x,0) |
→ x |
2: |
|
plus(0,y) |
→ y |
3: |
|
plus(s(x),y) |
→ s(plus(x,y)) |
4: |
|
times(0,y) |
→ 0 |
5: |
|
times(s(0),y) |
→ y |
6: |
|
times(s(x),y) |
→ plus(y,times(x,y)) |
7: |
|
div(0,y) |
→ 0 |
8: |
|
div(x,y) |
→ quot(x,y,y) |
9: |
|
quot(0,s(y),z) |
→ 0 |
10: |
|
quot(s(x),s(y),z) |
→ quot(x,y,z) |
11: |
|
quot(x,0,s(z)) |
→ s(div(x,s(z))) |
12: |
|
div(div(x,y),z) |
→ div(x,times(y,z)) |
|
There are 8 dependency pairs:
|
13: |
|
PLUS(s(x),y) |
→ PLUS(x,y) |
14: |
|
TIMES(s(x),y) |
→ PLUS(y,times(x,y)) |
15: |
|
TIMES(s(x),y) |
→ TIMES(x,y) |
16: |
|
DIV(x,y) |
→ QUOT(x,y,y) |
17: |
|
QUOT(s(x),s(y),z) |
→ QUOT(x,y,z) |
18: |
|
QUOT(x,0,s(z)) |
→ DIV(x,s(z)) |
19: |
|
DIV(div(x,y),z) |
→ DIV(x,times(y,z)) |
20: |
|
DIV(div(x,y),z) |
→ TIMES(y,z) |
|
The approximated dependency graph contains 3 SCCs:
{13},
{15}
and {16-19}.
-
Consider the SCC {13}.
There are no usable rules.
By taking the AF π with
π(PLUS) = 1 together with
the lexicographic path order with
empty precedence,
rule 13
is strictly decreasing.
-
Consider the SCC {15}.
There are no usable rules.
By taking the AF π with
π(TIMES) = 1 together with
the lexicographic path order with
empty precedence,
rule 15
is strictly decreasing.
-
Consider the SCC {16-19}.
The usable rules are {1-6}.
By taking the AF π with
π(div) = π(DIV) = π(QUOT) = 1 together with
the lexicographic path order with
precedence times ≻ plus ≻ s,
the rules in {16,18,19}
are weakly decreasing and
the rules in {1-6,17}
are strictly decreasing.
There is one new SCC.
-
Consider the SCC {16,18,19}.
By taking the AF π with
π(DIV) = π(QUOT) = 1
and π(div) = [1] together with
the lexicographic path order with
precedence times ≻ plus ≻ s,
the rules in {16,18}
are weakly decreasing and
the rules in {1-6,19}
are strictly decreasing.
There is one new SCC.
-
Consider the SCC {16,18}.
There are no usable rules.
By taking the AF π with
π(DIV) = π(QUOT) = 2
and π(s) = [ ] together with
the lexicographic path order with
precedence 0 ≻ s,
rule 16
is weakly decreasing and
rule 18
is strictly decreasing.
Hence the TRS is terminating.
Tyrolean Termination Tool (0.05 seconds)
--- May 4, 2006